<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <style>
        .nav{
            background-color: pink;
        }
    </style>
    <ul class="nav">
        <li>我的首页</li>
        <li>产品介绍</li>
        <li>联系方式</li>
    </ul>
    <script>
        let a = document.querySelectorAll('ul li')
    </script> -->
    <!-- <style>
        div{
            width: 200px;
            height: 100px;
        }
    </style>
    <div></div>
   <script>
    function getrandomcolor(flag){
        let arr=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
        let str ='#'
        if (flag){
            for (let i =0;i<6;i++){
                str +=arr[Math.floor(Math.random()*arr.length)]
            }
            return str
        }else{
             const r =Math.floor(Math.random()*256);
    const g =Math.floor(Math.random()*256);
    const b =Math.floor(Math.random()*256);
    return`rgb(${r},${g},${b})`
        }
    }
    console.log(getrandomcolor(ture))
    console.log(getrandomcolor(false))
    const divv=document.querySelector('div')
    divv.style.backgroundColor=getrandomcolor(ture)
   
     
   </script> -->
   <style>
    .box{
        width: 100px;
        height: 200px;
        background-color: pink;
    }
   </style>
   <ul class="box">
    <h1><span class="one">一等奖</span></h1>
    <h2><span class="two">二等奖</span></h2>
   <h3><span class="three">三等奖</span></h3>
   </ul>
   <script>
        const personArr = ['周杰伦', '刘德华', '周星驰', '范老师', '张学友']
        const arr=['one','two','three']
        for(let i=0;i<arr.length;i++){
            const ran=Math.floor(Math.random()*personArr.length)
        }
   </script>
</body>
</html>